# from fastapi import APIRouter
# from sys.dtos import *
# from sys.models import *
# from common import ApiResult,PageParams
#
# api = APIRouter()
#
#
#
#
# # =====================   role   =======================
#
#
# @api.post("/role/page", summary="角色分页列表", description="角色分页列表")
# async def get_role_page(params: PageParams):
#     page = role_page(params)
#     return ApiResult(data=page)
#
#
# @api.post("/role", summary="角色保存", description="角色保存")
# async def save_role(item: RoleDto):
#     num = insert_role(item)
#     return ApiResult(data=num)
#
#
# @api.put("/role", summary="角色更新", description="角色更新")
# async def update_role(item: RoleDto):
#     num = update_role(item)
#     return ApiResult(data=num)
#
#
# @api.delete("/role/{id}", summary="角色删除", description="角色删除")
# async def delete_role(id: int):
#     num = delete_role(id)
#     return ApiResult(data=num)
#
#
# @api.get("/role/{id}", summary="角色详情", description="角色详情")
# async def role_info(id: int):
#     item = get_role(id)
#     return ApiResult(data=item)
#
# # =====================   user   =======================
#
#
# @api.post("/user/page", summary="用户分页列表", description="用户分页列表")
# async def get_user_page(params: PageParams):
#     page = user_page(params)
#     return ApiResult(data=page)
#
#
# @api.post("/user", summary="用户保存", description="用户保存")
# async def save_user(item: UserDto):
#     num = insert_user(item)
#     return ApiResult(data=num)
#
#
# @api.put("/user", summary="用户更新", description="用户更新")
# async def update_user(item: UserDto):
#     num = update_user(item)
#     return ApiResult(data=num)
#
#
# @api.delete("/user/{id}", summary="用户删除", description="用户删除")
# async def delete_user(id: int):
#     num = delete_user(id)
#     return ApiResult(data=num)
#
#
# @api.get("/user/{id}", summary="用户详情", description="用户详情")
# async def user_info(id: int):
#     item = get_user(id)
#     return ApiResult(data=item)
